package com.bdjk.bdmw.InfoGath.business.beianbei.model;

import java.util.Date;

import com.bdjk.bdmw.InfoGath.business.beianbei.vo.BeiAnBeiPositionVO;
import com.bdjk.bdmw.InfoGath.common.constants.InfoGathConstants;
import com.bdjk.bdmw.InfoGath.common.model.BaseModel;

public class BeiAnBeiPositionModel extends BaseModel{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	// id
	private int id;
	//通信类型
	private String commType;
	// 设备唯一标识
	private String terIdent;
	// 对应协议编码
	private String proCode;
	// 终端发送时间
	private Date sendTime;
	// 是否定位
	private String isEchoLocation;
	// 经度
	private String longitude;
	// 纬度
	private String latitude;
	// 速度
	private double speed;
	// 方向
	private double direction;
	// 海拔
	private double altitude;
	// 卫星数量
	private int satelliteNum;
	// gsm型号强度
	private double gsmSignStrength;
	// 电量
	private int electricity;
	// 记步数
	private int stepNum;
	// 翻滚数
	private int rollNum;
	// 终端状态
	private String terStatus;
	// 基站个数
	private String baseInfo;
	// 连接基站GSM时延（不太懂这个属性含义）
	private String wifiInfo;
	
    public int msgLength;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getCommType() {
		return commType;
	}

	public void setCommType(String commType) {
		this.commType = commType;
	}

	public String getTerIdent() {
		return terIdent;
	}

	public void setTerIdent(String terIdent) {
		this.terIdent = terIdent;
	}

	public String getProCode() {
		return proCode;
	}

	public void setProCode(String proCode) {
		this.proCode = proCode;
	}

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public String getIsEchoLocation() {
		return isEchoLocation;
	}

	public void setIsEchoLocation(String isEchoLocation) {
		this.isEchoLocation = isEchoLocation;
	}

	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	public double getSpeed() {
		return speed;
	}

	public void setSpeed(double speed) {
		this.speed = speed;
	}

	public double getDirection() {
		return direction;
	}

	public void setDirection(double direction) {
		this.direction = direction;
	}

	public double getAltitude() {
		return altitude;
	}

	public void setAltitude(double altitude) {
		this.altitude = altitude;
	}

	public int getSatelliteNum() {
		return satelliteNum;
	}

	public void setSatelliteNum(int satelliteNum) {
		this.satelliteNum = satelliteNum;
	}

	public double getGsmSignStrength() {
		return gsmSignStrength;
	}

	public void setGsmSignStrength(double gsmSignStrength) {
		this.gsmSignStrength = gsmSignStrength;
	}

	public int getElectricity() {
		return electricity;
	}

	public void setElectricity(int electricity) {
		this.electricity = electricity;
	}

	public int getStepNum() {
		return stepNum;
	}

	public void setStepNum(int stepNum) {
		this.stepNum = stepNum;
	}

	public int getRollNum() {
		return rollNum;
	}

	public void setRollNum(int rollNum) {
		this.rollNum = rollNum;
	}

	public String getTerStatus() {
		return terStatus;
	}

	public void setTerStatus(String terStatus) {
		this.terStatus = terStatus;
	}

	public String getBaseInfo() {
		return baseInfo;
	}

	public void setBaseInfo(String baseInfo) {
		this.baseInfo = baseInfo;
	}

	public String getWifiInfo() {
		return wifiInfo;
	}

	public void setWifiInfo(String wifiInfo) {
		this.wifiInfo = wifiInfo;
	}

	public int getMsgLength() {
		return msgLength;
	}

	public void setMsgLength(int msgLength) {
		this.msgLength = msgLength;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public BeiAnBeiPositionVO model2VO() {
		BeiAnBeiPositionVO vo = new BeiAnBeiPositionVO();
		vo.setId(String.valueOf(this.id));
		vo.setCommType(this.commType);
		vo.setTerIdent(this.terIdent);
		vo.setProCode(this.proCode);
		if (null != this.sendTime) {
			vo.setSendTime(InfoGathConstants.SDF.format(this.sendTime));
		}
		vo.setIsEchoLocation(this.isEchoLocation);
		vo.setLongitude(this.longitude);
		vo.setLatitude(this.latitude);
		vo.setSpeed(String.valueOf(this.speed));
		vo.setDirection(String.valueOf(this.direction));
		vo.setAltitude(String.valueOf(this.altitude));
		vo.setSatelliteNum(String.valueOf(this.satelliteNum));
		vo.setGsmSignStrength(String.valueOf(this.gsmSignStrength));
		vo.setElectricity(String.valueOf(this.electricity));
		vo.setStepNum(String.valueOf(this.stepNum));
		vo.setRollNum(String.valueOf(this.rollNum));
		vo.setTerStatus(this.terStatus);
		vo.setBaseInfo(this.baseInfo);
		vo.setWifiInfo(this.wifiInfo);
		
		return vo;
	}

	
	public BeiAnBeiShortModel getShortModel(){
		BeiAnBeiShortModel model=new BeiAnBeiShortModel();
		model.setCommType(commType);
		model.setMsgLength(String.valueOf(msgLength));
		model.setProCode(proCode);
		model.setTerIdent(terIdent);
		return model;
	}
}
